#ifndef WORKPIECE_H
#define WORKPIECE_H

#include <QObject>

#include <thread>
#include <cstring>

class Workpiece : public QObject
{
    Q_OBJECT
public:
    explicit Workpiece(QObject *parent = nullptr);
    virtual void CacheData(int workpieceId,
                         int pictureId) = 0;
    virtual void ProcessData() = 0;

    /***********************************************************************
     *  @function SetTemplatePath
     *  @brief    设置模板s_model的存放目录
     *  @param
     *  @return
    ***********************************************************************/
    virtual bool SetTemplatePath(const std::string &path) = 0;

    /***********************************************************************
     *  @function SetStandardVal
     *  @brief    设置标准值
     *  @param
     *  @return
    ***********************************************************************/
    virtual void SetStandardVal(const std::map<std::string, float> &standardValMap) = 0;

signals:
    void MesurementCalResponse(int workpieceId,
                               int PictureId);

public slots:

public:
    std::thread             m_thread;
};

#endif // WORKPIECE_H
